package com.lpf.json.fastjson.JSONField;

import java.util.Date;

import com.alibaba.fastjson.JSON;

public class TestJSONField {

	public static void main(String[] args) {
		User user = new User();
		user.setId(100L);
		user.setName("WaKengMaiNi");
		user.setSex("男");
		user.setAddress("杭州");
		user.setPhone("18603396966");
		user.setDate(new Date());

		// User序列化
		String jsonString = JSON.toJSONString(user);
		System.out.println("User序列化:" + jsonString);
	}
}
